package com.demo.common.datasource;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mybatisplus配置
 */
@Configuration
@MapperScan("com.demo.mapper")
public class MybatisPlusConfig{

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor=new PaginationInterceptor();
        //不设置分页大小
        paginationInterceptor.setLimit(-1);
        return paginationInterceptor;
    }

}
